<template>
  <div class="home">
    <NavBar>
      <template v-slot:default>
        图书兄弟
      </template>
    </NavBar>
  </div>
</template>

<script>
import NavBar from "../components/common/navbar/NavBar";
import { getHomeAllData } from "../network/home";
import { onMounted, ref } from "vue";
export default {
  name: "Home",
  components: { NavBar },
  setup() {
    const banner = ref([]);
    onMounted(() => {
      getHomeAllData().then((res) => {
        banner.value = res.goods.data;
        console.log(banner.value);
      });
    });
    return {
      banner,
    };
  },
};
</script>
